package com.deyuanyun.pic.pipe.enumeration;

/**
 * Created by linwei on 10/31/2016.
 */
public enum PipeExportEnum {

    PipeLineInfo("pipeLineInfo", "管道基本信息.xls", "pipe_line_info.xls", 2),
    ValveRoom("valveRoom", "场站阀室.xls", "valvaRoom_template.xls", 2),
    Valve("valve", "线路阀门.xls", "valve_template.xls", 2),
    GWW("gww", "环焊缝信息.xls", "gww_template.xls", -1),
    SteelPipe("steelPipe", "钢管信息.xls", "steelpipe_template.xls", 1),
    Bow("bow", "弯头信息.xls", "bow_template.xls", -1),
    Tee("tee", "三通信息.xls", "tee_template.xls", 2),
    Tap("tap", "开孔信息.xls", "tap_template.xls", 2),
    Closure("closure", "封堵物信息.xls", "closure_template.xls", 2),
    Reducer("reducer", "异径管信息.xls", "reducer_template.xls", 2),
    PiggingStructure("piggingStructure", "收发球筒信息.xls", "piggingstructure_template.xls", 1),
    Cross("cross", "套管信息.xls", "cross_template.xls", 2),
    PipeCross("pipeCross", "穿跨越信息.xls", "pipecross_template.xls", 2),
    Adjunct("adjunct", "附属物信息(点，线).xls", "adjunct_template.xls", -1),
    Identification("identification", "地面标识.xls", "identification_template.xls", 1),
    Marker("marker", "埋地标识信息.xls", "marker_template.xls", -1),
    Protection("protection", "水工保护信息.xls", "protection_template.xls", 2),
    TransformMedia("transformMedia", "输送介质.xls", "transform_media_template.xls", 1);

    private String type;
    private String fileName;
    private String tempPath;
    private Integer beginRow;

    private PipeExportEnum(String type, String fileName, String tempPath, Integer beginRow) {
        this.type = type;
        this.fileName = fileName;
        this.tempPath = tempPath;
        this.beginRow = beginRow;
    }

    public String getType() {
        return type;
    }

    public String getFileName() {
        return fileName;
    }

    public String getTempPath() {
        return tempPath;
    }

    public Integer getBeginRow() {
        return beginRow;
    }

    public static PipeExportEnum getEnum(String type) {
        PipeExportEnum[] rs = PipeExportEnum.values();
        for(int i=0,end=rs.length;i<end;i++) {
            if(rs[i].getType().equals(type)) {
                return rs[i];
            }
        }
        return null;
    }
}
